<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title></title>
    <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>/pintuer.css">
    <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>/admin.css">
    <link rel="stylesheet" href="<?php echo (C("CSS_URL")); ?>/index.css">
    <script src="<?php echo (C("JS_URL")); ?>/jquery.js"></script>
    <script src="<?php echo (C("JS_URL")); ?>/pintuer.js"></script>
    <link href="/Public/css/noty/jquery.noty.css" rel="stylesheet">
    <script src="/Public/Js/noty/jquery.noty.js"></script>
    <link href="/Public/css/noty/noty_theme_default.css" rel="stylesheet">
</head>
<?php echo hook('showMsg');?>
<body>
<form method="post" action="" id="listform">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> <?php echo ($title); ?></strong> <a href="" style="float:right; display:none;">添加字段</a></div>
    <div class="padding border-bottom">
      <ul class="search" style="padding-left:10px;">
        <li> <a class="button border-main icon-plus-square-o" href="<?php echo U('Admin/addbg');?>"> 用户添加</a> </li>
        <li>
          <input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" />
          <a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a></li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="100" style="text-align:left; padding-left:20px;">ID</th>
        <th>姓名</th>
        <th >昵称</th>
        <th >拥有的角色</th>
        <th >联系电话</th>
        <th width="310">操作</th>
      </tr>

       <?php if(is_array($list)): foreach($list as $key=>$vo): ?><tr>
          <td style="text-align:left; padding-left:20px;"><?php echo ($vo['id']); ?></td>
          <td><?php echo ($vo['username']); ?></td>
          <td><?php echo ($vo['eName']); ?></td>
          <td><?php echo ($vo['role_name']); ?></td>
          <td><?php echo ($vo['tel']); ?></td>
          <td><div class="button-group"> <a class="button border-main" href="javascript:edit(<?php echo ($vo['id']); ?>)"><span class="icon-edit"></span> 修改</a> <a class="button border-red" href="javascript:del(<?php echo ($vo['id']); ?>)"><span class="icon-trash-o"></span> 删除</a> </div></td>
        </tr><?php endforeach; endif; ?>
      <tr>
        <td colspan="8"><div class="pagelist"><?php echo ($page); ?></div></td>
      </tr>
    </table>
  </div>
</form>
<script type="text/javascript">

//搜索
function changesearch(){	
		
}

//单个删除
function del(id){
	if(confirm("您确定要删除吗?")){
        window.location.href="/Admin/Admin/delAdmin/userId/"+id;
	}
}

function edit(id){
    window.location.href="/Admin/Admin/editAdmin/userId/"+id;
}
</script>
</body>
</html>